Utility tarantoolctl
tarantoolctl is a utility for administering Tarantool
instances,
checkpoint files and
modules.
It is shipped and installed as part of Tarantool distribution.
See also tarantoolctl usage examples in Server administration
section.
tarantoolctl COMMAND NAME [URI] [FILE] [OPTIONS..]
where:
COMMANDis one of the following:start,stop,status,restart,logrotate,check,enter,eval,connect,cat,play,rocks.NAMEis the name of an instance file or a module.FILEis the path to some file (.lua, .xlog or .snap).URIis the URI of some Tarantool instance.OPTIONSare options taken by sometarantoolctlcommands.
tarantoolctl start NAMEStart a Tarantool instance.
Additionally, this command sets the TARANTOOLCTL environment variable to ‘true’, to mark that the instance was started by
tarantoolctl.Note
tarantoolctlworks for instances withoutbox.cfg{}called or with delayedbox.cfg{}call.For example, this can be used to manage instances which receive configuration from an external server. For such instances,
tarantoolctl startgoes to background whenbox.cfg{}is called, so it will wait until options forbox.cfgare received. However this is not the case for daemon management systems likesystemd, as they handle backgrounding on their side.tarantoolctl stop NAME- Stop a Tarantool instance.
tarantoolctl status NAMEShow an instance’s status (started/stopped). If pid file exists and an alive control socket exists, the return code is
0. Otherwise, the return code is not0.Reports typical problems to stderr (e.g. pid file exists and control socket doesn’t).
tarantoolctl restart NAMEStop and start a Tarantool instance.
Additionally, this command sets the TARANTOOL_RESTARTED environment variable to ‘true’, to mark that the instance was restarted by
tarantoolctl.tarantoolctl logrotate NAME- Rotate logs of a started Tarantool instance. Works only if logging-into-file is enabled in the instance file. Pipe/syslog make no effect.
tarantoolctl check NAME- Check an instance file for syntax errors.
tarantoolctl enter NAME- Enter an instance’s interactive Lua console.
tarantoolctl eval NAME FILE- Evaluate a local Lua file on a running Tarantool instance.
tarantoolctl connect URI- Connect to a Tarantool instance on an admin-console port. Supports both TCP/Unix sockets.
tarantoolctl cat FILE.. [--space=space_no ..] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id ..]- Print into stdout the contents of .snap/.xlog files.
tarantoolctl play URI FILE.. [--space=space_no ..] [--show-system] [--from=from_lsn] [--to=to_lsn] [--replica=replica_id ..]- Play the contents of .snap/.xlog files to another Tarantool instance.
Supported options:
--space=space_noto filter the output by space number. May be passed more than once.--show-systemto show the contents of system spaces.--from=from_lsnto show operations starting from the given lsn.--to=to_lsnto show operations ending with the given lsn.--replica=replica_idto filter the output by replica id. May be passed more than once.
tarantoolctl rocks install NAME- Install a module in the current directory.
tarantoolctl rocks remove NAME- Remove a module.
tarantoolctl rocks show NAME- Show information about an installed module.
tarantoolctl rocks search NAME- Search the repository for modules.
tarantoolctl rocks list- List all installed modules.
tarantoolctl rocks pack {<rockspec> | <name> [<version>]}Create a rock by packing sources or binaries.
As an argument, you can specify:
- a
.rockspecfile to create a source rock containing the module’s sources, or - the name of an installed module (and its version if there are more than one) to create a binary rock containing the compiled module.
- a
tarantoolctl rocks unpack {<rock_file> | <rockspec> | <name> [version]}Unpack the contents of a rock into a new directory under the current one.
As an argument, you can specify:
- source or binary rock files,
.rockspecfiles, or- names of rocks or
.rockspecfiles in remote repositories (and the rock version if there are more than one).
Supported options:
--server=server_namecheck this server first, then the usual list.--only-server=server_namecheck this server only, ignore the usual list.